/**************************************************************************
 * @doc pwrfids
 * @module pfr 
 * Include for the power failure recovery module. 
 *
 * Product     :   SoftPay 2000 (Global Payment Methodology).
 * <nl>Developer   :   Bruce Girdlestone
 * <nl>Notes       :
 *
 * Copyright (c) 1996-2000 by VeriFone Inc. All rights reserved.
 * 
 * No part of this software may be used, stored, compiled, reproduced,
 * modified, transcribed, translated, transmitted, or transferred, in any form 
 * or by any means whether electronic, mechanical, magnetic, optical, 
 * or otherwise, without the express prior written permission of VeriFone, Inc.
 *
 * Revision History
 * ------------------------------------------------------------------------
 * $log: \softpay\SPK2SIM\SOURCE\POWRFAIL\PWRFIDS.H $
 * ------------------------------------------------------------------------
 ********************************************************************************/

#define MAX_FUNCTION_IDS		20

/* Default power failure recovery states */
#define PFR_IDLE_STATE_RECOVER						0x6001
#define PFR_BEGIN_PRINTING_RECEIPT_RECOVER			0x6002
#define PFR_RECEIPT_COMPLETE_PENDING_RECOVER		0x6003
#define PFR_BEGIN_BATCH_UPDATE_RECOVER				0x6004
#define PFR_BATCH_UPDATE_COMPLETE_RECOVER			0x6005
#define PFR_DATA_STATE_RECOVER						0x6006
#define PFR_RECOVERY_CLEANUP						0x6007
#define PFR_RECOVERY_MESSAGE						0x6008
#define PFR_INIT_SETTLE_RECOVERY					0x6009
#define PFR_SETTLE_REPORT_RECOVER					0x600A
#define PFR_RECOVER_INIT							0x6010

#define PFR_IDLE_STATE						1
#define PFR_BATCH_UPDATE_COMPLETE			2
#define PFR_BEGIN_PRINTING_RECEIPT			3
#define PFR_RECEIPT_COMPLETE_PENDING		4
#define PFR_BEGIN_BATCH_UPDATE				5
#define PFR_BEGIN_PRINTING_RECEIPT_HEADER	6
#define PFR_BEGIN_UPDATE_ACCUM				7
#define PFR_UPDATE_ACCUM_COMPLETE			8
#define PFR_BEGIN_UPDATE_CLERK				9
#define PFR_UPDATE_CLERK_COMPLETE			10
#define PFR_BEGIN_UPDATE_SHIFT				11
#define PFR_UPDATE_SHIFT_COMPLETE			12
#define PFR_BEGIN_SETTLEMENT				13
#define PFR_BEGIN_SETTLE_REPORT				14
#define PFR_BEGIN_UPDATE_COUNTER			15
#define PFR_UPDATE_COUNTER_COMPLETE			16


/* Field ID's for the power failure record */
#define PFR_STATE			1
#define PFR_UPDATE_DATE		2
#define PFR_UPDATE_TIME		3
#define PFR_FAILURE_COUNTER	4
#define PFR_REC_FAIL_COUNT		5
#define PFR_TRAN_OBJ_FILE		6
#define PFR_TRANOBJ_STORED		7


/* Base transient data globals also stored in the PFR state file */
#define PFR_HOST_DEFINITION_RECORD 100
#define	PFR_BATCH_FLEXI_RECORD	101
#define PFR_GVAR_RECEIPT_RECORD 102
#define PFR_BATCH_FLEXI_BUFFER  103
#define PFR_MIT_RECORD			104
#define PFR_CDT_RECORD			105
#define PFR_LINE_FLEXI			106
#define PFR_MHT_RECORD			107
#define	PFR_TRANS_FLEXI_RECORD	108
#define	PFR_BDT_RECORD          109
#define PFR_SETTLE_SUCCEED		200
#define PFR_PRINT_BOTH			201
